var DialogUtils = function (){
	function showInnerDialog(options){
		return layer.open(options); 
	}
	return{
		//打开一个html片段的窗口
		innerDialog:function(options){
			options = options || {};
			options.type = 1;
			return showInnerDialog(options);
			
		},
		//打开一个iframe窗口
		open:function(options){
			options = options || {};
			options.type = 2;
			return showInnerDialog(options);
		},
		openMax:function(options){
			options = options || {};
			options.type = 2;
			options.move =false;
			var index = showInnerDialog(options);
			layer.full(index);
		},
		// 获取iframe页的DOM
		getChildFrame:function(selector, index){
			return layer.getChildFrame(selector, index) 
		},
		//得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
		getChildFrameWindow:function(layero){
			return window[layero.find('iframe')[0]['name']];
		},
		//获取特定iframe层的索引
		getFrameIndex:function(windowName){
			return layer.getFrameIndex(windowName);
		},
		//指定iframe层自适应
		setIframeAuto:function(index){
			layer.iframeAuto(index);
		},
		//重置特定iframe url
		setIframeSrc:function(index, url){
			layer.iframeSrc(index, url)
		},
		//置顶当前窗口
		setDialogTop:function(layero){
			layer.setTop(layero) 
		},
		//关闭指定窗口
		close:function(index){
			layer.close(index);
		},
		//关闭所有窗口
		closeAll:function(type){
			layer.closeAll(type);
		}
		
	}
}();